package generics;

import object.Point;

public class Demo3 {
    public static void main(String[] args) {
        TransferObject3<String> t = new TransferObject3<>();
        String r = t.doSome("hello");//T doSome(T t)
//        int r = t.doSome(123);//编译不通过，泛型与类上指定的不同

        //参数与返回值类型相同即可
        int r1 = t.doSome1(123);
        String r2 = t.doSome1("hello");
        Point p3 = t.doSome1(new Point(1,2));
    }
}
